/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.hhx.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.hhx.entity.HhxFocus;
import com.thinkgem.jeesite.modules.hhx.dao.HhxFocusDao;

/**
 * 单表生成Service
 * @author zmy
 * @version 2019-04-10
 */
@Service
@Transactional(readOnly = true)
public class HhxFocusService extends CrudService<HhxFocusDao, HhxFocus> {
	
	@Autowired
	private HhxFocusDao hhxFocusDao;

	public HhxFocus get(String id) {
		return super.get(id);
	}
	
	public List<HhxFocus> findList(HhxFocus hhxFocus) {
		return super.findList(hhxFocus);
	}
	
	public Page<HhxFocus> findPage(Page<HhxFocus> page, HhxFocus hhxFocus) {
		return super.findPage(page, hhxFocus);
	}
	
	@Transactional(readOnly = false)
	public void save(HhxFocus hhxFocus) {
		super.save(hhxFocus);
	}
	
	@Transactional(readOnly = false)
	public void delete(HhxFocus hhxFocus) {
		super.delete(hhxFocus);
	}

	@Transactional(readOnly = false)
	public int insertFocus(String id, String userid, String focusid) {
		// TODO Auto-generated method stub
		return hhxFocusDao.insertFocus(id,userid,focusid);
	}

	public int countFocus(String focusid) {
		// TODO Auto-generated method stub
		return hhxFocusDao.countFocus(focusid);
	}

	public int getCount(String userid, String focusid) {
		// TODO Auto-generated method stub
		return hhxFocusDao.getCount(userid,focusid);
	}

	@Transactional(readOnly = false)
	public int delFocus(String userid, String focusid) {
		// TODO Auto-generated method stub
		return hhxFocusDao.delFocus(userid,focusid);
	}

	public List<Object[]> getList(String userid) {
		// TODO Auto-generated method stub
		return hhxFocusDao.getList(userid);
	}

	public List<Object[]> getList2(String focusid) {
		// TODO Auto-generated method stub
		return hhxFocusDao.getList2(focusid);
	}
	
}